package com.ljl.spring.service.Impl;

import com.ljl.spring.bean.Student;
import com.ljl.spring.dao.StudentDao;
import com.ljl.spring.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;

public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao dao;
    @Override
    public Student getStudent() {
        return dao.getStudent();
    }

    @Override
    public String login(String name, String passwd) {
        Student student = dao.getStudent();
        if(student!=null){
            if(student.getName().equals(name)){
                return "true";
            }else {
                return "账号错误";
            }
        }
        return "true";
    }
}
